<% content_for :css do %>
  <%= stylesheet_link_tag 'index','furniture_styles_index' %>
<% end %>
<% content_for :title do %>-家具款式<% end %>
<div class='body'>
  <div class='top'>
    <div class='title'>
      <b>基础数据</b><span>家具款式</span>
    </div>
  </div>
  <div class="search">
    <%= form_tag furniture_styles_url,
          :method => :get do %> 
      <%= hidden_field_tag :target, params[:target] %>
      <%= text_field_tag :key_words, params[:key_words] ,:class => :search, :onfocus => 'select()' %>
      <%= submit_tag '查找款式', :class => :bb %>
      <%= link_to '新增款式', new_furniture_style_url,  :class => :new %>
    <% end %>
  </div>  
  <div class="page">
    <div class="total_currnet"><p>共</p><b><%= @furniture_styles.size %></b><p>种款式</p></div>
  </div>
  <div class="index">  
    <% @furniture_styles.each do |furniture_style| %>
    <div id='furniture_style_<%= furniture_style.id %>' class="monomer">
      <div class="content">
        <div class="title">
          <div class="name">
            <b><%= furniture_style.code %></b><%= furniture_style.name %>
          </div>
          <div class="information">
            <p class="statistics">
              <%= furniture_style.factory.name %>
            </p>
          </div>
        </div>      
        <div class="article">
          <%= furniture_style.remark %>
        </div>
      </div>
      <div class="operate">
        <%= link_to '修改',edit_furniture_style_url(furniture_style), :class => 'button' %>
        <% if furniture_style.status.visible? %>
        <%= link_to '隐藏',
              hide_furniture_style_url(furniture_style),
              :confirm => '确认要设置为隐藏吗？',
              :method => :put,
              :class => 'button',
              :id => "hide_furniture_style_#{furniture_style.id}_link"
         %>
         <% else %>
         <%= link_to '可见',
              visible_furniture_style_url(furniture_style),
              :confirm => '确认要设置为可见吗？',
              :method => :put,
              :class => 'button',
              :id => "visible_furniture_style_#{furniture_style.id}_link"
         %>
         <% end %>
      </div>
    </div>
    <% end %>
  </div>
  <div class="page">
    <div class="total_currnet"><p>共</p><b><%= @furniture_styles.size %></b><p>种款式</p></div>
  </div>  
</div>

        